<?php defined('SYSPATH') or die('No direct script access.');

class Controller_404 extends Controller {
	
	public function before(){
		parent::before();
		
		/*$this->template = new lib_template();
		$this->template->title = '404报错信息';
		$this->template->navigate = new lib_navigate();
		$this->template->navigate->add('404报错信息');
		
		$this->template->main(View::factory('template/main'));
		$this->template->head(View::factory('template/head'));
		$this->template->foot(View::factory('template/foot'));
		$this->template->extra(View::factory('template/extra'));*/
	}
	
	public function after(){		
		if ($this->request->is_ajax()){
			$ajax = new lib_ajax();
			$ajax->fail('HTTP/1.0 404 Not Found')->json()->exec();
		}else{
			echo View::factory('404/404')
			//echo View::factory('404/slj')
		    ->set('exception',$this->post)
		    ->set('referer',Session::instance()->get('ref'));
		}
		
		parent::after();
	}
	
	public function action_index()
	{
		$this->post = $this->request->post();
		/*var_dump($post);
		exit;*/
	}

} // End Welcome
